Type DungeonGenerator<T>
Namespace Karcero.Engine
Generates a map of cells of type T.
Methods
Public instance methods
void AddMapProcessor(IMapProcessor<T> mapProcessor)
Add a map processor that will be called at the end of the map generation library to further modify the map.
Parameters
-
IMapProcessor<T>
mapProcessor - The processor to add.
void BeginGenerate(Action<Map<T>> callback, DungeonConfiguration config, Nullable<int> seed)
Generates a map on a different thread.
Parameters
-
Action<Map<T>>
callback - Will be called when the generation is complete (on a different thread).
-
DungeonConfiguration
config - The configuration used to generate the map.
-
Nullable<int>
seed - A seed to be used for the generation. If null a random seed will be generated.
bool Equals(object obj)
Map<T> Generate(DungeonConfiguration config, Nullable<int> seed)
Generate a map according the configuration received.
Parameters
-
DungeonConfiguration
config - The configuration used to generate the map.
-
Nullable<int>
seed - A seed to be used for the generation. If null a random seed will be generated.
Returns
-
Map<T>
- The generated map.
DungeonConfigurationGenerator<T> GenerateA()
Creates an instance of the DungeonConfigurationGenerator that is linked to this instance.
Returns
-
DungeonConfigurationGenerator<T>
- An instance of DungeonConfigurationGenerator linked to this instance of DungeonGenerator.